package com.googlecode.excavator.test.service.impl;

import com.googlecode.excavator.Profiler;
import com.googlecode.excavator.test.service.SayService;

public class SayServiceImpl implements SayService {

	private String trim(String name) {
		try {
			Profiler.enter();
			return name.trim();
		}finally {
			Profiler.release();
		}
	}
	
	private String prefix(String name) {
		try {
			Profiler.enter();
			return "hello:"+trim(name);
		}finally {
			Profiler.release();
		}
	}
	
	@Override
	public String sayTo(String name) {
		return prefix(name);
	}

}
